<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>动画效果</title>
    <script type="text/javascript" src="../js/jquery-3.4.1.min.js"></script>
    <script>
        $(function(){
            // $("img").click(function(){
            //     $(this).animate({"left":"1800px"},1000)
            //         .animate({"left":"900px","top":"800px"},1000)
            //         .animate({"left":"0px","top":"0px"},1000);
            //     // 在jquery事件中,事件句柄传递函数参数表示当触发事件后执行的操作
            //     // 如果不传递参数,表示通过代码去触发事件
            //     $(this).click();
            // });
            $(".c1").click(function(){
                $(this).animate({"left":"1700px","width":"150px","height":"150px","border-radius":"25%"},1000)
                    .animate({"top":"700px","width":"200px","height":"200px","border-radius":"50%"},1000)
                    .animate({"left":"0px","width":"150px","height":"150px","border-radius":"25%"},1000)
                    .animate({"top":"0px","width":"100px","height":"100px","border-radius":"0%"},1000)
                $(this).click();
            })
        })
    </script>
</head>
<body>
<!--<img src="../images/heihei.gif" style="position: relative;left: 0px;top: 0px;"/>-->
<div class="c1" style="width: 100px;height: 100px;background-color: red;position: relative;left: 0px;top: 0px;"></div>
</body>
</html>